"""
职位数据序列化器
"""
from rest_framework import serializers
from .models import Position, AIPosition


class PositionSerializer(serializers.ModelSerializer):
    """职位信息序列化器"""
    
    class Meta:
        model = Position
        fields = '__all__'


class PositionListSerializer(serializers.ModelSerializer):
    """职位列表序列化器（简化版）"""
    
    class Meta:
        model = Position
        fields = [
            'id', 'position_name', 'company_full_name', 'city', 'district',
            'salary', 'salary_min', 'salary_max', 'salary_avg',
            'work_year', 'education', 'company_size', 'finance_stage',
            'position_advantage'
        ]


class AIPositionSerializer(serializers.ModelSerializer):
    """AI岗位信息序列化器"""
    
    class Meta:
        model = AIPosition
        fields = '__all__'


class AIPositionListSerializer(serializers.ModelSerializer):
    """AI岗位列表序列化器（简化版）"""
    
    class Meta:
        model = AIPosition
        fields = [
            'id', 'position_name', 'company_name', 'location_city', 'location_district',
            'salary', 'salary_min', 'salary_max', 'salary_avg', 'salary_months',
            'experience', 'education', 'tags', 'company_scale', 'financing_status'
        ]

